/* 储存组织相关控件字段 */

import { IcomponentItem } from '../types';

/* 储存组织相关属性 */
export const businessControl: IcomponentItem[] = [
  {
    componentName: '法定代表人',
    code: 'LEGAL_REPRESENTATIVE',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'legalRepresentative',
    props: {
      placeholder: '请输入法定代表人'
    }
  },
  {
    componentName: '统一社会信用代码',
    code: 'CREDIT_CODE',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'credit_code',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '经营状态',
    code: 'BUSINESS_STATUS',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'businessStatus',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '注册资本',
    code: 'REGISTERED_CAPITAL',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'registeredCapital',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '实缴资本',
    code: 'PAID_CAPITAL',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'paidCapital',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '注册工商号',
    code: 'BUSINESS_NUMBER',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'businessNumber',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '企业类型',
    code: 'ENTERPRISE_TYPE',
    componentType: 'SELECT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'enterpriseType',
    props: {
      placeholder: '请选择'
    }
  },
  {
    componentName: '成立时间',
    code: 'ESTABLISHED_TIME',
    componentType: 'DATE',
    icon: 'icon-calendar',
    showFieldList: ['placeholder', 'dateFormat', 'showTime'],
    fieldName: 'establishedTime',
    props: {
      placeholder: '请输入日期',
      dateFormat: 'YYYY-MM-DD HH:mm:ss', // 时间格式
      showTime: true, // 是否为带日期的选择器
      valueFormat: 'x' // 传给后端的时间格式(默认为时间戳)
    }
  },
  {
    componentName: '核准日期',
    code: 'APPROVAL_DATE',
    componentType: 'DATE',
    icon: 'icon-calendar',
    showFieldList: ['placeholder', 'dateFormat', 'showTime'],
    fieldName: 'approvalDate',
    props: {
      placeholder: '请输入日期',
      dateFormat: 'YYYY-MM-DD HH:mm:ss', // 时间格式
      showTime: true, // 是否为带日期的选择器
      valueFormat: 'x' // 传给后端的时间格式(默认为时间戳)
    }
  },
  {
    componentName: '纳税人识别号',
    code: 'TAXPAYER_NUMBER',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'taxpayerNumber',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '纳税人资质',
    code: 'TAXPAYER_QUALIFICATION',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'taxpayerQualification',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '所属行业',
    code: 'INDUSTRY',
    componentType: 'SELECT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'industry',
    props: {
      placeholder: '请选择'
    }
  },
  {
    componentName: '营业期限',
    code: 'BUSINESS_TERM',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'businessTerm',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '所属地区',
    code: 'REGION',
    componentType: 'SELECT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'region',
    props: {
      placeholder: '请选择'
    }
  },
  {
    componentName: '登记机关',
    code: 'REGISTRAR',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'registrar',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '人员规模',
    code: 'PERSONNEL_SIZE',
    componentType: 'SELECT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'personnelsize',
    props: {
      placeholder: '请选择'
    }
  },
  {
    componentName: '参保人数',
    code: 'INSURED_NUMBER',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'InsuredNumber',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '企业地址',
    code: 'ENTERPRISE_ADDRESS',
    componentType: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'enterpriseAddress',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '经营范围',
    code: 'BUSINESS_NATURE',
    componentType: 'TEXT_AREA',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'businessNature',
    props: {
      placeholder: '请输入'
    }
  },
  {
    componentName: '营业执照',
    code: 'BUSINESS_LICENSE',
    componentType: 'FILE',
    icon: 'icon-danhangwenben',
    showFieldList: ['placeholder'],
    fieldName: 'businessNature',
    props: {
      placeholder: '请输入'
    }
  }
];

/* 储存code */
export const businessControlField = [
  'LEGAL_REPRESENTATIVE',
  'CREDIT_CODE',
  'BUSINESS_STATUS',
  'REGISTERED_CAPITAL',
  'PAID_CAPITAL',
  'BUSINESS_NUMBER',
  'ENTERPRISE_TYPE',
  'ESTABLISHED_TIME',
  'APPROVAL_DATE',
  'TAXPAYER_NUMBER',
  'TAXPAYER_QUALIFICATION',
  'INDUSTRY',
  'REGISTRAR',
  'BUSINESS_TERM',
  'REGION',
  'PERSONNEL_SIZE',
  'INSURED_NUMBER',
  'ENTERPRISE_ADDRESS',
  'BUSINESS_NATURE',
  'BUSINESS_LICENSE'
];
